﻿#include<vector>
#include<iostream>
using namespace std;
int main()
{
	int arr[] = { 1,2,3,4,0,5,6,7,8,9 };
	int n = sizeof(arr) / sizeof(int);
	vector<int>v(arr, arr + n);
	vector<int>::iterator it = v.begin();
	while (it != v.end())
	{
		if (*it != 0)
			cout << *it;
		else
			v.erase(it);
		it++;
	}
	return 0;
}